package com.buddy.syn.block._06;

public class Task {

    public void otherMethod(){
        System.out.println("---------------> run otherMethod!");
    }

    public void doLongTimeTask(){
        synchronized (this){
            for (int i=0;i<1000;i++){
                System.out.println("synchronized theradName = "+Thread.currentThread().getName()
                        +" i = "+(i+1));
            }
        }
    }
}
